package cn.geminis.crypto.csp.soft;


import cn.geminis.crypto.csp.RandomGenerator;

import java.security.SecureRandom;

/**
 * @author Allen
 */
public class SoftRandomGenerator implements RandomGenerator {

    private SecureRandom random = new SecureRandom();

    @Override
    public byte[] random(int length) {
        byte[] data = new byte[length];
        random.nextBytes(data);
        return data;
    }

    @Override
    public void close() {
    }
}
